from protocol import SORBProtocol
import user_pb2, avatar_pb2

class Credentials :
    dataType = user_pb2.Credentials
    def __init__(self):
        self.data = self.dataType()



class IMSession(SORBProtocol) :

    def __init__(self):
        supportedTypes = {
            'User' : User,
            'MessageService' : MessageService,
            'FriendService' : FriendService
        }

    def connectionMade(self):
        SORBProtocol.connectionMade()

    def connectionLost(self, reason):
        SORBProtocol.connectionLost(reason)

class IMClient(SORBClientFactory) :
    protocol = IMSession

    def blablabla(self):
        pass

class IMServer(SORBServerFactory):
    protocol = IMSession

    def broadcast(self):
        pass






